class A {

}
class B extends A {

}
class C extends B {

}
public class Test {

    public static void main(String[] args) {
        A a0=new A();//1

        A a1=new B();//2

        A a2=new C();//3
    }
}